# 2024/1/11 10:16 HFL
import configparser
import pymysql
# 读取ini 或config类型  文件
def configmysql():
    conf = configparser.ConfigParser()
    # 文件路径
    conf.read('../config/dbmysql.ini')
    # 获取内容
    user = conf.get('devdba', 'user')
    host = conf.get('devdba', 'host')
    password = conf.get('devdba', 'password')
    port = conf.get('devdba', 'port')
    db = conf.get('devdba', 'database')
    charset = conf.get("devdba", 'charset')
    myconfig = {"user": user, "host": host, "port": port, "database": db, "charset":charset,"password":password}
    return myconfig

if __name__ == '__main__':
    print(configmysql().get('port'))